 <?php
if(isset($_POST['search']) || (isset($_GET['sort'])))
{

    if(isset($_POST['search'])){
    $b = $_POST['search'];
    }else{
    if(isset($_GET['word'])){
    $b = $_GET['word'];
    }
    }
   
    if(isset($_GET['sort'])){
    $d = $_GET['sort'];
    }else{
      $d = 0;
    }


$company_product = new CP_Controller();

$c = $company_product->searchHandler($b,$d);
echo $c;
   
}
?>